import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

export default new VueRouter ({
    mode: 'history',
    routes: [
        // {
        // path: '/',
        // redirect: {name:'Sys-Login'},
        // name: 'IndexPage',
        // component: () => import('@/views/index'),
    // },
    {
        path: '/',
        // redirect: {name:'SysConTent'},
        name: 'Sys-Login',
        component: () => import('@/views/components/sys-login'),
    },
    {
        path: '/SysConTent',
        name: 'SysConTent',
        redirect: {name:'HomePage'},
        meta: { title: '首页' },
        component: () => import('@/views/components/sys-content'),
        children: [
            {
                path: '/SysConTent/HomePage',
                meta: { title: '首页' },
                name: 'HomePage',
                component: () => import('@/views/components/mian/home-page'),
            },
            {
                path: '/SysConTent/UsefulForms',
                meta: { title: '用户列表' },
                name: 'UsrfulForms',
                component: () => import('@/views/components/mian/useful-forms')
            },
            {
                path: '/SysConTent/TabLabel',
                name: 'TabLabel',
                meta: { title: '消息通知' },
                component: () => import('@/views/components/mian/tab-label')
            },
            {
                path: '/SysConTent/category',
                name: 'cateGory',
                meta: { title: '商品分类' },
                component: () => import('@/views/components/mian/category')
            },
            {
                path: '/SysConTent/ProductList',
                name: 'ProductList',
                meta: { title: '商品列表' },
                component: () => import('@/views/components/mian/ProductList')
            },
            {
                path: '/SysConTent/PermissionList',
                name: 'PermissionList',
                meta: { title: '权限列表' },
                component: () => import('@/views/components/mian/PermissionList')
            },
            {
                path: '/SysConTent/PermissionDetails',
                name: 'PermissionDetails',
                meta: { title: '权限详情' },
                component: () => import('@/views/components/mian/PermissionDetails')
            },
            {
                path: '/SysConTent/echart',
                name: 'eChart',
                meta: { title: '数据统计' },
                component: () => import('@/views/components/mian/echart')
            },
            {
                path: '/SysConTent/PersonalCenter',
                name: 'PersonalCenter',
                meta: { title: '个人中心' },
                component: () => import('@/views/components/mian/Personal')
            },
            {
                path: '/SysConTent/OrderList',
                name: 'orderList',
                meta: { title: '订单管理' },
                component: () => import('@/views/components/mian/OrderList')
            },
        ]
    }
    ]
})